﻿using BCEntity.TMS.VehicleIgnoreOrderAssignRecord;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.VehicleIgnoreOrderAssignRecord
{
    /// <summary>
    /// 车辆忽略订单指派记录
    /// </summary>
    public interface IVehicleIgnoreOrderAssignRecordData
    {
        /// <summary>
        /// 获取今日忽略次数
        /// </summary>
        /// <param name="driverId">司机Id</param>
        /// <returns></returns>
        int GetTodayIgnoreCount(long driverId);
        /// <summary>
        /// 添加车辆忽略订单指派记录
        /// </summary>
        /// <param name="vehicleIgnoreOrderAssignRecordEntity">车辆忽略订单指派记录信息</param>
        /// <returns></returns>
        Task<VehicleIgnoreOrderAssignRecordEntity> Add(VehicleIgnoreOrderAssignRecordEntity vehicleIgnoreOrderAssignRecordEntity);
        /// <summary>
        /// 查询车辆忽略订单指派记录信息
        /// </summary>
        /// <param name="vehicleNo">车牌号</param>
        /// <param name="orderNo">订单编号</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<VehicleIgnoreOrderAssignRecordEntity>, int)> Query(string vehicleNo, string orderNo, DateTime? start, DateTime? end, int pageIndex, int pageSize);

        /// <summary>
        /// 更新车辆忽略订单指派记录车牌号
        /// </summary>
        /// <param name="driverId">司机ID</param>
        /// <param name="vehicleNo">车牌号</param>
        /// <returns></returns>
        Task<int> UpdateVehicleNoByVehicleIdAsync(long driverId, string vehicleNo);
    }
}
